package com.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.entity.Teacher;
import com.example.repository.TeacherRepository;

@Service
public class TeacherService {
    @Autowired
    private TeacherRepository teacherRepository;
    
    public  List<Teacher> getTeacher(){
    	return (List<Teacher>) teacherRepository.findAll();
    }
   public Teacher getName(String name){
	   return teacherRepository.getName(name);
   }
}
